<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>采购中心
    <span class="c-gray en">&gt;</span> 商品库
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div class="page-container">
    <div>
        <form action="?" method="get">
            <div style="display: inline-block">
                商品分类：
                <span class="select-box inline">
		<select name="goods_cate" class="select goods_cate">
            <option value="0" {if condition="$gets['goods_cate'] == 0" } selected{/if}>综合</option>
            {volist name="item_cates" id="vo"}
			<option value="{$vo.id}" {if condition="$vo['id'] == $gets['goods_cate']" }
                    selected{/if}>{$vo.name}</option>
            {/volist}
		</select>
		</span>
            </div>
            <div  style="display: inline-block">
                券后价格：
                <input type="text" name="min_price" id="min_price" value="{$gets.min_price|default=''}"
                       class="input-text" placeholder="最低价" style="width:100px;">
                 -
                <input type="text" name="max_price" id="max_price" value="{$gets.max_price|default=''}"
                       class="input-text" placeholder="最高价" style="width:100px;">
            </div>
            <div  style="display: inline-block">
                排序：
                <span class="select-box inline">
		<select name="sort" class="select sort">
            <option value="0" {if condition="$gets['sort'] == 0" } selected{/if}>最新</option>
			<option value="1" {if condition="$gets['sort'] == 1" } selected{/if}>券后价（低到高）</option>
			<option value="2" {if condition="$gets['sort'] == 2" } selected{/if}>券后价（高到低）</option>
			<option value="3" {if condition="$gets['sort'] == 3" } selected{/if}>券面额</option>
			<option value="4" {if condition="$gets['sort'] == 4" } selected{/if}>销量</option>
			<option value="5" {if condition="$gets['sort'] == 5" } selected{/if}>拥金比例</option>
		</select>
		</span>
            </div>
            <div  style="display: inline-block">
                销量：
                <input type="text" name="sales_volume" id="sales_volume" value="{$gets.sales_volume|default=''}"
                       placeholder=" 销量" style="width:100px" class="input-text">
            </div>
            <div  style="display: inline-block">
                关键词：
                <input type="text" name="key_word" id="key_word" value="{$gets.key_word|default=''}" class="input-text" placeholder="关键词" style="width:200px;">
            </div>
            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 筛选</button>
        </form>
    </div>
    <div class="wrapper" style="margin-top: 20px">
        <div class="goods-list clearfix">
            {volist name='data' id='vo'}
            <div class="goods-item ">
                <div class="goods-item-content">
                    <div class="goods-img">
                        <a href="javascript:" onclick="goods_purchase('采购单','{:url(\'goods/add_goods\',[\'id\'=>$vo.itemid])}',$(window).width()*0.5,$(window).height()*0.9)">
                            <img class="lazy" src="{$vo.itempic}" data-original="{$vo.itempic}">
                        </a>
                    </div>
                    <div class="goods-info">
										<span class="goods-tit">
											<a href="javascript:" onclick="goods_purchase('采购单','{:url(\'goods/add_goods\',[\'id\'=>$vo.itemid])}',$(window).width()*0.5,$(window).height()*0.9)" target="_blank">
												{$vo.itemtitle}
                                            </a>
										</span>
                        <div class="goods-slider">
                            <span class="slider"><em data-width="0%"></em></span>
                        </div>
                        <div class="goods-qjy">
                            <div class="goods-price"><span>券后价</span>
                                <p><b style="color: red"><i class="rmb-style">￥</i>{$vo.itemendprice}</b></p></div>
                            <div class="goods-yj" title="佣金 7.16 元">
                                <span>{$vo.tktype}</span>
                                <p>{$vo.tkrates}<b>%</b></p>
                            </div>
                        </div>
                        <div class="goods-sale clearfix">
                            <div class="goods-quan fl"><p>券<b><i class="rmb-style">￥</i>{$vo.couponmoney}</b></p></div>
                            <span class="fl">销量<b>{$vo.itemsale}</b></span>
                            {if condition="$vo['shoptype'] == 'B'"}
                            <div class="tmall clearfix">
                                <i class="tag-tmall"></i>
                            </div>
                            {else /}
                            <div class="taobao clearfix">
                                <i class="tag-tmall"></i>
                            </div>
                            {/if}
                        </div>
                    </div>
                </div>
            </div>
            {/volist}
        </div>
    </div>
    <div class="row">
        <div class="col-sm-2" id="pageBox">
            {$page}
        </div>
    </div>

</div>
<!--包含footer文件-->
{include file="public/footer" /}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__STATIC__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__STATIC__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script src="__STATIC__/js/dropload.min.js"></script>

<script type="text/javascript">
    /*
     参数解释：
     title	标题
     url		请求的url
     id		需要操作的数据id
     w		弹出层宽度（缺省调默认值）
     h		弹出层高度（缺省调默认值）
     */
    /*采购单*/
    function goods_purchase(title, new_url,w,h) {
        // var new_url =  '/admin/goods/add_gooods/id/'+id+'/user_type/'+user_type+'/item_cate/'+item_cate+'/activityid/'+activityid+'/couponmoney/'+couponmoney;
        // alert(new_url);
        layer_show(title, new_url, w, h);
    }
</script>
</body>
</html>